GJSHOME=~/src/gjs/
TOP=/tmp
wget ftp://ftp.dti.ad.jp/pub/lang/gcc/releases/gcc-4.6.0/gcc-4.6.0.tar.gz
tar zxf gcc-4.6.0.tar.gz
mv gcc-4.6.0 gcc-dev
mkdir gcc-build
cd $TOP/gcc-dev
patch -p3 -d. <  $GJSHOME/patch/configure.patch
patch -p3 -d. <  $GJSHOME/patch/configure.ac.patch
patch -p3 -d. <  $GJSHOME/patch/makefile.def.patch
ln -s $GJSHOME/libgjs .
autogen Makefile.def
cd $TOP/gcc-dev/gcc
ln -s $GJSHOME/gjs js
cd $TOP/gcc-build/
../gcc-dev/configure --with-gmp=/Users/masa/Gentoo/usr/ --disable-nls --disable-multilib --disable-mpc --prefix=/Users/masa --disable-bootstrap --enable-languages=c,js
make -j8 && make install
